package com.google.code.krillion.firehose.data;

import java.util.Date;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Reply {
    @PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    private Long id;

    @Persistent
    private String friendName;

    @Persistent
    private String question;

    @Persistent
    private String answer;

    @Persistent
    private String upc;

    @Persistent
    private String zip;

    @Persistent
    private Date date;
    
    public static String UNDEFINED = "TBD";
    
    public Reply(String friendName, String question, String answer, String upc, String zip) {
    	this.friendName = friendName;
    	this.question = question;
    	this.answer = answer;
    	this.upc = upc;
    	this.zip = zip;
    	this.date = new Date();
    }
    
    // get/set methods for the fields.  JDO doesn't use these, but your application does.

    public Long getId() {
        return id;
    }

    public String getFriendName() {
    	return friendName;
    }

    public String getQuestion() {
    	return question;
    }

    public String getAnswer() {
    	return answer;
    }

    public String getUpc() {
    	return upc;
    }

    public void setUpc(String upc) {
    	this.upc = upc;
    }

    public String getZip() {
    	return zip;
    }

    public void setZip(String zip) {
    	this.zip = zip;
    }

    public Date getDate() {
    	return date;
    }
}
